package com.jlz.actions.login;

import org.springframework.beans.factory.annotation.Autowired;

import com.julewa.Client;
import com.julewa.db.BeanValidator;


public class LoginBase {
	
	protected @Autowired Client client;
	protected @Autowired BeanValidator validator;
	protected String usercode;
	protected String password;
	
	protected boolean validate(){
		validator.checkField("usercode", "账号", usercode, 3, 100); 
		validator.checkField("password", "密码", password, 3, 64);
		return !client.hasError();
	}
	
	public String getUsercode() {
		return usercode;
	}
	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	
}
